//
//  UIViewController+YBBlock.m
//  YBTool
//
//  Created by 陈亚勃 on 16/1/4.
//  Copyright © 2016年 cyb. All rights reserved.
//

#import "UIViewController+YBBlock.h"
#import <objc/runtime.h>
static char callBackBlockKey;
@implementation UIViewController (YBBlock)

- (void)setCallBackBlock:(YBCallBackBlock)callBackBlock{
    objc_setAssociatedObject(self, &callBackBlockKey, callBackBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (YBCallBackBlock)callBackBlock{
    return objc_getAssociatedObject(self, &callBackBlockKey);
}

@end
